package com.youkeyi.ddy.cloud.common.api.application.system.pay;

import com.youkeyi.ddy.cloud.common.api.application.system.pay.dto.SystemPayTypeListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.system.pay.param.SystemPayTypeCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.pay.param.SystemPayTypeDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.pay.param.SystemPayTypeListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.pay.param.SystemPayTypeUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统支付类型
 *
 * @PayTypeor liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【SYSTEM】Pay Type Management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-SYSTEM", fallback = SystemPayTypeCloudServiceFallback.class)
@RequestMapping("/system/pay/type")
public interface SystemPayTypeCloudService {

    // 查询支付类型列表
    @ApiOperation(value = "Query System Pay Type List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.pay.SystemPayTypeCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = SystemPayTypeListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query System Pay Type List", dataType = "SystemPayTypeListCloudParam", dataTypeClass = SystemPayTypeListCloudParam.class),
    })
    @GetMapping
    public abstract SystemPayTypeListCloudDto list(SystemPayTypeListCloudParam param);

    // 创建支付类型
    @ApiOperation(value = "Create System Pay Type", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.pay.SystemPayTypeCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create System Pay Type", dataType = "SystemPayTypeCreateCloudParam", dataTypeClass = SystemPayTypeCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody SystemPayTypeCreateCloudParam param);


    // 编辑支付类型
    @ApiOperation(value = "Update System Pay Type", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.pay.SystemPayTypeCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update System Pay Type", dataType = "SystemPayTypeUpdateCloudParam", dataTypeClass = SystemPayTypeUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody SystemPayTypeUpdateCloudParam param);


    // 删除支付类型
    @ApiOperation(value = "Delete System Pay Type", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.pay.SystemPayTypeCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete System Pay Type", dataType = "SystemPayTypeDeleteCloudParam", dataTypeClass = SystemPayTypeDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(SystemPayTypeDeleteCloudParam param);

}
